
package com.zz.normal.util.image;


public final class ZLAndroidImageManager extends ZLImageManager {
	
	private static ZLAndroidImageManager instance;
	
	public static ZLAndroidImageManager getInstance() {
		if(null == instance){
			instance = new ZLAndroidImageManager();
		}
		return instance;
	}

	public ZLAndroidImageData getImageData(ZLImage image) {
		
		if (image instanceof ZLSingleImage) {
			ZLSingleImage singleImage = (ZLSingleImage)image;
			if ("image/palm".equals(singleImage.mimeType())) {
				return null;
			}
			byte[] array = singleImage.byteData();
			if (array == null) {
				return null;
			}
			return new ZLAndroidImageData(array);
		} else {
			return null;
		}
	}
}
